#include <iostream>
using namespace std;

// 已知
int h, w;
// 未知
string s[1000];
int maxx = -1, maxy = -1;
int minx = 1000, miny = 1000;

int main()
{
    cin >> h >> w;
    for (int i = 0; i < h; i++)
    {
        cin >> s[i];
        for (int j = 0; j < w; j++)
        {
            if (s[i][j] == '#')
            {
                maxx = max(maxx, i), maxy = max(maxy, j);
                minx = min(minx, i), miny = min(miny, j);
            }
        }
    }
    for (int i = minx; i <= maxx; i++)
    {
        for (int j = miny; j <= maxy; j++)
        {
            if(s[i][j]=='.')
            {
                cout << "No" << endl;
                return 0;
            }
        }
    }
    cout<<"Yes"<<endl;
    return 0;
}